package tool;

import java.util.UUID;

import javax.sql.DataSource;

import com.mchange.v2.c3p0.ComboPooledDataSource;

public class StaticTools {
	private static DataSource ds;
	
	/**
	 * uuid获得一个不重复的32位字符串
	 * @return 返回uuid
	 */
	public static String getUUID(){
		return UUID.randomUUID().toString().replaceAll("-", "");
	};
	
	public static DataSource getDataSource(){
		if(ds==null){
			ds = new ComboPooledDataSource();
			return ds;
		}else{
			return ds;
		}
		
 
	}
}
